<?php

$userid = get_loggedin_userid();

$xmpp_accounts = get_whiteboard_xmpp_accounts($userid);

$results = array();

foreach($xmpp_accounts as $xmpp_account) {
    $results[] = to_whiteboard_xmpp_account_array($xmpp_account);
}

echo json_encode(export_result(200, $results));

?>